<?php


namespace app\api\model;

use app\common\model\ChannelBcard as ChannelBcardModel;
use app\common\service\Order as OrderService;

class ChannelBcard extends ChannelBcardModel
{
    /**
     * 渠道银行卡激活
     * @param $bcard_id  银行卡id
     * @param $channel_id 渠道id
     * @param $isNotifiy 是否需要异步验证
     * @return false|int
     */
    public static function insertData($bcard_id,$channel_id,$isNotifiy){
        $model = (new static());
        $note = '激活成功';
        $status = 1;
        $data = [
            'bcard_id' => $bcard_id,
            'orderno' =>OrderService::createOrderNo(),
            'channel_id' => $channel_id,
            'notes' => $note,
            'status' => $status,
            'wxapp_id' => self::$wxapp_id,
        ];
        return $model->save($data);
    }
}